<%-- 
    Document   : home_content
    Created on : 05-ene-2012, 0:17:02
    Author     : tpgalan
--%>
<%@page import="com.sdd.plains.CustomerPlain"%>
<%@page import="com.sdd.plains.ProductPlain"%>
<%@page import="java.util.List"%>

                    <div class="content" id="content">
                        <%
                        Long id = (Long) request.getSession().getAttribute("paint_product");
                        if(id!=null) {
                        %>
                        <script type="text/javascript">
                        viewProduct(<%=id%>);      
                        </script>    
                        <%    
                                request.getSession().removeAttribute("paint_product");
                            }
                            else {
                        %>
                        <script type="text/javascript">
                        loadProducts();       
                        </script>
                        <%}%>
                    </div>
                </div><!-- Cierre de mid2 -->

                <div class="footer">
                <%
                CustomerPlain cp = (CustomerPlain) request.getSession().getAttribute("customer");
                if (cp != null) {
                %>
                    Connected as: <%=cp.getLogin()%> (<a href="./LoginDispatcher">Disconnect</a>)
                <%}else{%>
                    <a href="#login" onclick="getPage('login.jsp')">Login</a>
                <%}%>
                </div>
            </div><!-- Cierre de mid1 -->
        </div><!-- Cierre de left -->

        <div class="summary">
            <div class="sumbuttom">
                <img src="img/cart.gif" width="50" height="50" style="position: relative; top: 47%"/>
            </div>
            <div class="sumcontent" id="sumcontent">
                <script type="text/javascript">
                $.post("./display_cart.jsp", function(data){
                    $("#sumcontent").html(data);
                })    
                </script>
            </div>
        </div>
    </body>
</html>